var app = getApp()
Page({
    data: {
        userInfo: {},
        num: '',
        isShowFootNav:true
    },

    onUnload() {
		// app.setStorageSync('tagSign',1)
	},
	
    onShow() {
        this.setData({userInfo:app.globalData.userInfo});
	    var that = this;
	    //获得订单数
	    app.getOrderNum(function (num){
		    that.setData({num: num})
	    })

	    // app.setStorageSync(app.globalData.callVisaSign,1)  //用于首页是否调用签注类别标记

    },

    toUrl(e) {
        let url = e.currentTarget.dataset.url;
        if (url!='/pages/mine/mine') {
            if (url == '') {
                //develop（开发版），trial（体验版），release（正式版）
                let res = {
                    appid: app.globalData.appid,
                    path: '',
                    envVersion: app.globalData.envVersion
                }
                app.crossToUrl(res)
            } else {
                app.redirectTo({url: url});
            }
        }
    },
    problemTap() {
        app.navigateTo({url:'../problem/problem'});
    },
    downloadTap(){
        app.navigateTo({url:'../download/download'});
    },
    callTap() {
        app.makePhoneCall("020-11183");
    },
    orderDoingTap() {
        app.navigateTo({url:'../orderlist/orderlist?bizFlag='+app.globalData.bizDoingFlag});
    },
    orderFinishTap() {
        app.navigateTo({url:'../orderlist/orderlist?bizFlag='+app.globalData.bizFinishFlag});
    },
    orderAllTap() {
        app.navigateTo({url:'../orderlist/orderlist?bizFlag='+app.globalData.bizAllFlag});
    }
});